<?php
/*
nJajal pakai function array mau nggak yahhh... LOL
rekayasa fungsi untuk landingpage Dynazon
thanks to my ide koclok dan ndableg ini... 
semoga selamat dari deindex nya si mbah.. wakakaka
*/

//menfungsikan random call url produk sesuai asin list 
session_start();
    if (!isset($_SESSION['asinlist']))       
        $_SESSION['asinlist'] = array();     
    if (empty($_SESSION['asinlist']))        
    {
        $_SESSION['asinlist'] = file('asinlist.txt', FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES); 
        $safe = array_pop($_SESSION['asinlist']); 
        shuffle($_SESSION['asinlist']);         
        array_push($_SESSION['asinlist'], $safe); 
    }
    $asin = trim(array_pop($_SESSION['asinlist'])); 
header("Location: $asin");
?> 